package org.example.bio;

import java.io.*;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;

public class Client {

    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1",9000);
//        SocketAddress address = new InetSocketAddress("127.0.0.1",9000);
//        socket.connect(address);
        PrintStream printStream = new PrintStream(socket.getOutputStream());
        printStream.println("ddddd");
        printStream.flush();
        printStream.close();

        InputStreamReader input = new InputStreamReader(socket.getInputStream());
        BufferedReader br = new BufferedReader(input);
        System.out.print("服务器返回:" + br.readLine());
        br.close();

    }
}
